package com.fjec.market.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjec.market.entity.InfoMarket;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 001.市场表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2020-09-07
 */
public interface InfoMarketMapper extends BaseMapper<InfoMarket> {

    @Select("select market.* from info_market market, biz_market_busi bmb where market.MarkCode = bmb.MarkCode and bmb.BusiId = #{busiId}")
    List<InfoMarket> getMarketsByBusiId(@Param("busiId") Long busiId);

    Integer getMaxMarkCode();

    /**
     * 获取所有市场编号列表
     *
     * @return
     */
    List<Map<String, Object>> getAllMarketCode();
}
